import static org.junit.Assert.*;

import org.junit.Assert;
import org.junit.Test;


public class GatherMergeSortTest {

/*	@Test
	public void testGatherMergeAndSort() {
		fail("Not yet implemented");
	}
*/
	@Test
	public void testScanPipeLine() {
		Person p = GatherMergeSort.scanPipeLine("Smith | Steve | D | M | Red | 3-3-1985");
		Assert.assertTrue(p.getLastName().equals("Smith"));
		Assert.assertTrue(p.getFirstName().equals("Steve"));
		Assert.assertTrue(p.getGender().equals("Male"));
		Assert.assertTrue(p.getColor().equals("Red"));
		Assert.assertTrue(p.getDob().toString().equals("Sun Mar 03 00:00:00 EST 1985"));
	}

	@Test
	public void testScanCommaLine() {
		Person p = GatherMergeSort.scanCommaLine("Abercrombie, Neil, Male, Tan, 2/13/1943");
		Assert.assertTrue(p.getLastName().equals("Abercrombie"));
		Assert.assertTrue(p.getFirstName().equals("Neil"));
		Assert.assertTrue(p.getGender().equals("Male"));
		Assert.assertTrue(p.getColor().equals("Tan"));
		Assert.assertTrue(p.getDob().toString().equals("Sat Feb 13 00:00:00 EDT 1943"));
	}

	@Test
	public void testScanSpaceLine() {
		Person p = GatherMergeSort.scanSpaceLine("Kournikova Anna F F 6-3-1975 Red");
		Assert.assertTrue(p.getLastName().equals("Kournikova"));
		Assert.assertTrue(p.getFirstName().equals("Anna"));
		Assert.assertTrue(p.getGender().equals("Female"));
		Assert.assertTrue(p.getColor().equals("Red"));
		Assert.assertTrue(p.getDob().toString().equals("Tue Jun 03 00:00:00 EDT 1975"));
	}
}
